package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 持卡人商户无密码策略DAO
 * 
 * @author yxb
 * 
 */
@Remote
@Local
public interface MerchantSecretPolicyDao {
	/**
	 * 创建策略
	 * 
	 * @param msp
	 *            持卡人商户无密码策略
	 * @throws PCPSApplicationException
	 */
	public void insert(MerchantSecretPolicy msp)
			throws PCPSApplicationException;

	/**
	 * 修改策略
	 * 
	 * @param msp
	 *            持卡人商户无密码策略
	 * @throws PCPSApplicationException
	 */
	public void update(MerchantSecretPolicy msp)
			throws PCPSApplicationException;

	/**
	 * 根据主键查询
	 * 
	 * @param mspid
	 *            持卡人商户无密码策略ID
	 * @return
	 */
	public MerchantSecretPolicy getMerchantSecretPolicyByPolicyId(
			BigInteger mspid);

	/**
	 * 根据业务查找满足条件的策略集合
	 * 
	 * @param msp
	 * @return
	 */
	public List<MerchantSecretPolicy> getMerchantSecretPolicyByBusiness(
			MerchantSecretPolicy msp);
	/**
	 * 根据业务查找满足条件的策略集合分页查询
	 * 
	 * @param msp
	 * @return
	 */
	public List<MerchantSecretPolicy> getMerchantSecretPolicyByBusinessPage(PCPSWebInput webInput,
			String MerchantNo,String CardFaceId,String CardClassicId,String Status, Integer page);
	/**
	 * 根据业务查找满足条件的策略集合数
	 * 
	 * @param msp
	 * @return
	 */
	public BigInteger getMerchantSecretPolicyByBusinessCount(PCPSWebInput webInput,
			String MerchantNo,String CardFaceId,String CardClassicId,String Status);
	/**
	 * 根据策略id删除策略
	 */
	public void deleteMerchantSecretPolicy(MerchantSecretPolicy msp)throws PCPSApplicationException;
}
